/*
 * DigitShopAdminView.java
 */

package digitshopadminapp;

import java.sql.*;
import org.jdesktop.application.Action;
import org.jdesktop.application.ResourceMap;
import org.jdesktop.application.SingleFrameApplication;
import org.jdesktop.application.FrameView;
import org.jdesktop.application.TaskMonitor;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.Timer;
import javax.swing.Icon;
import javax.swing.JDialog;
import javax.swing.JFrame;

/**
 * The application's main frame.
 */
public class DigitShopAdminMainFrame extends FrameView {

    private final Timer messageTimer;
    private final Timer busyIconTimer;
    private final Icon idleIcon;
    private final Icon[] busyIcons = new Icon[15];
    private int busyIconIndex = 0;
    public DigitShopAdminMainFrame(SingleFrameApplication app) {
        super(app);

        initComponents();

        // status bar initialization - message timeout, idle icon and busy animation, etc
        ResourceMap resourceMap = getResourceMap();
        int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout");
        messageTimer = new Timer(messageTimeout, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                statusMessageLabel.setText("");
            }
        });
        messageTimer.setRepeats(false);
        int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate");
        for (int i = 0; i < busyIcons.length; i++) {
            busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]");
        }
        busyIconTimer = new Timer(busyAnimationRate, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                busyIconIndex = (busyIconIndex + 1) % busyIcons.length;
                statusAnimationLabel.setIcon(busyIcons[busyIconIndex]);
            }
        });
        idleIcon = resourceMap.getIcon("StatusBar.idleIcon");
        statusAnimationLabel.setIcon(idleIcon);
        progressBar.setVisible(false);

        // connecting action tasks to status bar via TaskMonitor
        TaskMonitor taskMonitor = new TaskMonitor(getApplication().getContext());
        taskMonitor.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                String propertyName = evt.getPropertyName();
                if ("started".equals(propertyName)) {
                    if (!busyIconTimer.isRunning()) {
                        statusAnimationLabel.setIcon(busyIcons[0]);
                        busyIconIndex = 0;
                        busyIconTimer.start();
                    }
                    progressBar.setVisible(true);
                    progressBar.setIndeterminate(true);
                } else if ("done".equals(propertyName)) {
                    busyIconTimer.stop();
                    statusAnimationLabel.setIcon(idleIcon);
                    progressBar.setVisible(false);
                    progressBar.setValue(0);
                } else if ("message".equals(propertyName)) {
                    String text = (String)(evt.getNewValue());
                    statusMessageLabel.setText((text == null) ? "" : text);
                    messageTimer.restart();
                } else if ("progress".equals(propertyName)) {
                    int value = (Integer)(evt.getNewValue());
                    progressBar.setVisible(true);
                    progressBar.setIndeterminate(false);
                    progressBar.setValue(value);
                }
            }
        });
    }

    private JDialog itemForm;
    private JDialog customerForm;
    private JDialog storeForm;
    private JDialog employeeForm;
    private JDialog terminalForm;

    @Action
    public void showItemForm() {
        if (itemForm == null) {
            JFrame itemFrame = DigitShopAdminApp.getApplication().getMainFrame();
            itemForm = new DigitShopAdminItemForm(itemFrame);
            itemForm.setLocationRelativeTo(itemFrame);
        }
        DigitShopAdminApp.getApplication().show(itemForm);
    }

    @Action
    public void ShowCustomerForm() {
        if (customerForm == null) {
            JFrame customerFrame = DigitShopAdminApp.getApplication().getMainFrame();
            customerForm = new DigitShopAdminCustomerForm(customerFrame);
            customerForm.setLocationRelativeTo(customerFrame);
        }
        DigitShopAdminApp.getApplication().show(customerForm);
    }

    @Action
    public void ShowStoreForm() {
        if (storeForm == null) {
            JFrame storeFrame = DigitShopAdminApp.getApplication().getMainFrame();
            storeForm = new DigitShopAdminStoreForm(storeFrame, true);
            storeForm.setLocationRelativeTo(storeFrame);
        }
        DigitShopAdminApp.getApplication().show(storeForm);
    }

    @Action
    public void ShowEmployeeForm(){
        if (employeeForm == null) {
            JFrame employeeFrame = DigitShopAdminApp.getApplication().getMainFrame();
            employeeForm = new DigitShopAdminEmployeeForm(employeeFrame, true);
            employeeForm.setLocationRelativeTo(employeeForm);
        }
        DigitShopAdminApp.getApplication().show(employeeForm);

    }

    @Action
    public void ShowTerminalForm(){
        if (terminalForm == null) {
            JFrame terminalFrame = DigitShopAdminApp.getApplication().getMainFrame();
            terminalForm = new DigitShopAdminTerminalForm(terminalFrame, true);
            terminalForm.setLocationRelativeTo(terminalForm);
        }
        DigitShopAdminApp.getApplication().show(terminalForm);

    }


    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

        mainPanel = new javax.swing.JPanel();
        jTabbedPane_tables = new javax.swing.JTabbedPane();
        jPanel_stockItem = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable_stockItem = new javax.swing.JTable();
        jPanel_store = new javax.swing.JPanel();
        jPanel_customer = new javax.swing.JPanel();
        jPanel_employee = new javax.swing.JPanel();
        jPanel_terminal = new javax.swing.JPanel();
        menuBar = new javax.swing.JMenuBar();
        javax.swing.JMenu fileMenu = new javax.swing.JMenu();
        javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem();
        jMenu_Product = new javax.swing.JMenu();
        jMenuItem_AddItem = new javax.swing.JMenuItem();
        jMenuItem_EditItem = new javax.swing.JMenuItem();
        jMenuItem_SearchItem = new javax.swing.JMenuItem();
        jMenuItem_ListItem = new javax.swing.JMenuItem();
        jMenu_Customer = new javax.swing.JMenu();
        jMenuItem_AddCustomer = new javax.swing.JMenuItem();
        jMenuItem_EditCustomer = new javax.swing.JMenuItem();
        jMenuItem_SearchCustomer = new javax.swing.JMenuItem();
        jMenuItem_ListCustomer = new javax.swing.JMenuItem();
        jMenu_Store = new javax.swing.JMenu();
        jMenuItem_AddStore = new javax.swing.JMenuItem();
        jMenuItem_EditStore = new javax.swing.JMenuItem();
        jMenuItem_SearchStore = new javax.swing.JMenuItem();
        jMenuItem_ListStore = new javax.swing.JMenuItem();
        jMenuItem_AddEmployy = new javax.swing.JMenuItem();
        jMenuItem_EditEmployee = new javax.swing.JMenuItem();
        jMenuItem_SearchEmployee = new javax.swing.JMenuItem();
        jMenuItem_ListEmployee = new javax.swing.JMenuItem();
        jMenuItem_AddTerminal = new javax.swing.JMenuItem();
        jMenuItem_EditTerminal = new javax.swing.JMenuItem();
        jMenuItem_SearchTerminal = new javax.swing.JMenuItem();
        jMenuItem_ListTerminal = new javax.swing.JMenuItem();
        jMenu_Report = new javax.swing.JMenu();
        jMenuItem_GenerateReport_Store = new javax.swing.JMenuItem();
        jMenuItem_GenerateReport_Customer = new javax.swing.JMenuItem();
        jMenuItem_GenerateReport_Item = new javax.swing.JMenuItem();
        javax.swing.JMenu helpMenu = new javax.swing.JMenu();
        javax.swing.JMenuItem jMenuItem_About = new javax.swing.JMenuItem();
        statusPanel = new javax.swing.JPanel();
        javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator();
        statusMessageLabel = new javax.swing.JLabel();
        statusAnimationLabel = new javax.swing.JLabel();
        progressBar = new javax.swing.JProgressBar();

        mainPanel.setName("mainPanel"); // NOI18N
        mainPanel.setLayout(new java.awt.BorderLayout());

        jTabbedPane_tables.setName("jTabbedPane_tables"); // NOI18N

        jPanel_stockItem.setName("jPanel_stockItem"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        jTable_stockItem.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jTable_stockItem.setName("jTable_stockItem"); // NOI18N
        jScrollPane1.setViewportView(jTable_stockItem);

        javax.swing.GroupLayout jPanel_stockItemLayout = new javax.swing.GroupLayout(jPanel_stockItem);
        jPanel_stockItem.setLayout(jPanel_stockItemLayout);
        jPanel_stockItemLayout.setHorizontalGroup(
            jPanel_stockItemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel_stockItemLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 593, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel_stockItemLayout.setVerticalGroup(
            jPanel_stockItemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel_stockItemLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 440, Short.MAX_VALUE)
                .addContainerGap())
        );

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(digitshopadminapp.DigitShopAdminApp.class).getContext().getResourceMap(DigitShopAdminMainFrame.class);
        jTabbedPane_tables.addTab(resourceMap.getString("jPanel_stockItem.TabConstraints.tabTitle"), jPanel_stockItem); // NOI18N

        jPanel_store.setName("jPanel_store"); // NOI18N

        javax.swing.GroupLayout jPanel_storeLayout = new javax.swing.GroupLayout(jPanel_store);
        jPanel_store.setLayout(jPanel_storeLayout);
        jPanel_storeLayout.setHorizontalGroup(
            jPanel_storeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 613, Short.MAX_VALUE)
        );
        jPanel_storeLayout.setVerticalGroup(
            jPanel_storeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 462, Short.MAX_VALUE)
        );

        jTabbedPane_tables.addTab(resourceMap.getString("jPanel_store.TabConstraints.tabTitle"), jPanel_store); // NOI18N

        jPanel_customer.setName("jPanel_customer"); // NOI18N

        javax.swing.GroupLayout jPanel_customerLayout = new javax.swing.GroupLayout(jPanel_customer);
        jPanel_customer.setLayout(jPanel_customerLayout);
        jPanel_customerLayout.setHorizontalGroup(
            jPanel_customerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 613, Short.MAX_VALUE)
        );
        jPanel_customerLayout.setVerticalGroup(
            jPanel_customerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 462, Short.MAX_VALUE)
        );

        jTabbedPane_tables.addTab(resourceMap.getString("jPanel_customer.TabConstraints.tabTitle"), jPanel_customer); // NOI18N

        jPanel_employee.setName("jPanel_employee"); // NOI18N

        javax.swing.GroupLayout jPanel_employeeLayout = new javax.swing.GroupLayout(jPanel_employee);
        jPanel_employee.setLayout(jPanel_employeeLayout);
        jPanel_employeeLayout.setHorizontalGroup(
            jPanel_employeeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 613, Short.MAX_VALUE)
        );
        jPanel_employeeLayout.setVerticalGroup(
            jPanel_employeeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 462, Short.MAX_VALUE)
        );

        jTabbedPane_tables.addTab(resourceMap.getString("jPanel_employee.TabConstraints.tabTitle"), jPanel_employee); // NOI18N

        jPanel_terminal.setName("jPanel_terminal"); // NOI18N

        javax.swing.GroupLayout jPanel_terminalLayout = new javax.swing.GroupLayout(jPanel_terminal);
        jPanel_terminal.setLayout(jPanel_terminalLayout);
        jPanel_terminalLayout.setHorizontalGroup(
            jPanel_terminalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 613, Short.MAX_VALUE)
        );
        jPanel_terminalLayout.setVerticalGroup(
            jPanel_terminalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 462, Short.MAX_VALUE)
        );

        jTabbedPane_tables.addTab(resourceMap.getString("jPanel_terminal.TabConstraints.tabTitle"), jPanel_terminal); // NOI18N

        mainPanel.add(jTabbedPane_tables, java.awt.BorderLayout.CENTER);

        menuBar.setName("menuBar"); // NOI18N

        fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N
        fileMenu.setName("fileMenu"); // NOI18N

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(digitshopadminapp.DigitShopAdminApp.class).getContext().getActionMap(DigitShopAdminMainFrame.class, this);
        exitMenuItem.setAction(actionMap.get("quit")); // NOI18N
        exitMenuItem.setName("exitMenuItem"); // NOI18N
        fileMenu.add(exitMenuItem);

        menuBar.add(fileMenu);

        jMenu_Product.setText(resourceMap.getString("jMenu_Product.text")); // NOI18N
        jMenu_Product.setName("jMenu_Product"); // NOI18N

        jMenuItem_AddItem.setAction(actionMap.get("showItemForm")); // NOI18N
        jMenuItem_AddItem.setText(resourceMap.getString("jMenuItem_AddItem.text")); // NOI18N
        jMenuItem_AddItem.setName("jMenuItem_AddItem"); // NOI18N
        jMenu_Product.add(jMenuItem_AddItem);

        jMenuItem_EditItem.setAction(actionMap.get("showItemForm")); // NOI18N
        jMenuItem_EditItem.setText(resourceMap.getString("jMenuItem_EditItem.text")); // NOI18N
        jMenuItem_EditItem.setName("jMenuItem_EditItem"); // NOI18N
        jMenu_Product.add(jMenuItem_EditItem);

        jMenuItem_SearchItem.setText(resourceMap.getString("jMenuItem_SearchItem.text")); // NOI18N
        jMenuItem_SearchItem.setName("jMenuItem_SearchItem"); // NOI18N
        jMenu_Product.add(jMenuItem_SearchItem);

        jMenuItem_ListItem.setText(resourceMap.getString("jMenuItem_ListItem.text")); // NOI18N
        jMenuItem_ListItem.setName("jMenuItem_ListItem"); // NOI18N
        jMenuItem_ListItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem_ListItemActionPerformed(evt);
            }
        });
        jMenu_Product.add(jMenuItem_ListItem);

        menuBar.add(jMenu_Product);

        jMenu_Customer.setText(resourceMap.getString("jMenu_Customer.text")); // NOI18N
        jMenu_Customer.setName("jMenu_Customer"); // NOI18N

        jMenuItem_AddCustomer.setAction(actionMap.get("ShowCustomerForm")); // NOI18N
        jMenuItem_AddCustomer.setText(resourceMap.getString("jMenuItem_AddCustomer.text")); // NOI18N
        jMenuItem_AddCustomer.setName("jMenuItem_AddCustomer"); // NOI18N
        jMenu_Customer.add(jMenuItem_AddCustomer);

        jMenuItem_EditCustomer.setAction(actionMap.get("ShowCustomerForm")); // NOI18N
        jMenuItem_EditCustomer.setText(resourceMap.getString("jMenuItem_EditCustomer.text")); // NOI18N
        jMenuItem_EditCustomer.setName("jMenuItem_EditCustomer"); // NOI18N
        jMenu_Customer.add(jMenuItem_EditCustomer);

        jMenuItem_SearchCustomer.setText(resourceMap.getString("jMenuItem_SearchCustomer.text")); // NOI18N
        jMenuItem_SearchCustomer.setName("jMenuItem_SearchCustomer"); // NOI18N
        jMenu_Customer.add(jMenuItem_SearchCustomer);

        jMenuItem_ListCustomer.setText(resourceMap.getString("jMenuItem_ListCustomer.text")); // NOI18N
        jMenuItem_ListCustomer.setName("jMenuItem_ListCustomer"); // NOI18N
        jMenu_Customer.add(jMenuItem_ListCustomer);

        menuBar.add(jMenu_Customer);

        jMenu_Store.setText(resourceMap.getString("jMenu_Store.text")); // NOI18N
        jMenu_Store.setName("jMenu_Store"); // NOI18N

        jMenuItem_AddStore.setAction(actionMap.get("ShowStoreForm")); // NOI18N
        jMenuItem_AddStore.setText(resourceMap.getString("jMenuItem_AddStore.text")); // NOI18N
        jMenuItem_AddStore.setName("jMenuItem_AddStore"); // NOI18N
        jMenu_Store.add(jMenuItem_AddStore);

        jMenuItem_EditStore.setAction(actionMap.get("ShowStoreForm")); // NOI18N
        jMenuItem_EditStore.setText(resourceMap.getString("jMenuItem_EditStore.text")); // NOI18N
        jMenuItem_EditStore.setName("jMenuItem_EditStore"); // NOI18N
        jMenu_Store.add(jMenuItem_EditStore);

        jMenuItem_SearchStore.setText(resourceMap.getString("jMenuItem_SearchStore.text")); // NOI18N
        jMenuItem_SearchStore.setName("jMenuItem_SearchStore"); // NOI18N
        jMenu_Store.add(jMenuItem_SearchStore);

        jMenuItem_ListStore.setText(resourceMap.getString("jMenuItem_ListStore.text")); // NOI18N
        jMenuItem_ListStore.setName("jMenuItem_ListStore"); // NOI18N
        jMenu_Store.add(jMenuItem_ListStore);

        jMenuItem_AddEmployy.setName("jMenuItem_AddEmployy"); // NOI18N
        jMenu_Store.add(jMenuItem_AddEmployy);

        jMenuItem_EditEmployee.setText(resourceMap.getString("jMenuItem_EditEmployee.text")); // NOI18N
        jMenuItem_EditEmployee.setName("jMenuItem_EditEmployee"); // NOI18N
        jMenu_Store.add(jMenuItem_EditEmployee);

        jMenuItem_SearchEmployee.setText(resourceMap.getString("jMenuItem_SearchEmployee.text")); // NOI18N
        jMenuItem_SearchEmployee.setName("jMenuItem_SearchEmployee"); // NOI18N
        jMenu_Store.add(jMenuItem_SearchEmployee);

        jMenuItem_ListEmployee.setText(resourceMap.getString("jMenuItem_ListEmployee.text")); // NOI18N
        jMenuItem_ListEmployee.setName("jMenuItem_ListEmployee"); // NOI18N
        jMenu_Store.add(jMenuItem_ListEmployee);

        jMenuItem_AddTerminal.setText(resourceMap.getString("jMenuItem_AddTerminal.text")); // NOI18N
        jMenuItem_AddTerminal.setName("jMenuItem_AddTerminal"); // NOI18N

        org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jMenuItem_AddTerminal, org.jdesktop.beansbinding.ObjectProperty.create(), jMenuItem_AddTerminal, org.jdesktop.beansbinding.BeanProperty.create("selected"));
        bindingGroup.addBinding(binding);

        jMenu_Store.add(jMenuItem_AddTerminal);

        jMenuItem_EditTerminal.setText(resourceMap.getString("jMenuItem_EditTerminal.text")); // NOI18N
        jMenuItem_EditTerminal.setName("jMenuItem_EditTerminal"); // NOI18N
        jMenu_Store.add(jMenuItem_EditTerminal);

        jMenuItem_SearchTerminal.setText(resourceMap.getString("jMenuItem_SearchTerminal.text")); // NOI18N
        jMenuItem_SearchTerminal.setName("jMenuItem_SearchTerminal"); // NOI18N
        jMenu_Store.add(jMenuItem_SearchTerminal);

        jMenuItem_ListTerminal.setText(resourceMap.getString("jMenuItem_ListTerminal.text")); // NOI18N
        jMenuItem_ListTerminal.setName("jMenuItem_ListTerminal"); // NOI18N
        jMenu_Store.add(jMenuItem_ListTerminal);

        menuBar.add(jMenu_Store);

        jMenu_Report.setText(resourceMap.getString("jMenu_Report.text")); // NOI18N
        jMenu_Report.setName("jMenu_Report"); // NOI18N

        jMenuItem_GenerateReport_Store.setText(resourceMap.getString("jMenuItem_GenerateReport_Store.text")); // NOI18N
        jMenuItem_GenerateReport_Store.setName("jMenuItem_GenerateReport_Store"); // NOI18N
        jMenu_Report.add(jMenuItem_GenerateReport_Store);

        jMenuItem_GenerateReport_Customer.setText(resourceMap.getString("jMenuItem_GenerateReport_Customer.text")); // NOI18N
        jMenuItem_GenerateReport_Customer.setName("jMenuItem_GenerateReport_Customer"); // NOI18N
        jMenu_Report.add(jMenuItem_GenerateReport_Customer);

        jMenuItem_GenerateReport_Item.setAction(actionMap.get("showAboutBox")); // NOI18N
        jMenuItem_GenerateReport_Item.setText(resourceMap.getString("jMenuItem_GenerateReport_Item.text")); // NOI18N
        jMenuItem_GenerateReport_Item.setName("jMenuItem_GenerateReport_Item"); // NOI18N
        jMenu_Report.add(jMenuItem_GenerateReport_Item);

        menuBar.add(jMenu_Report);

        helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N
        helpMenu.setName("helpMenu"); // NOI18N

        jMenuItem_About.setAction(actionMap.get("showAboutBox")); // NOI18N
        jMenuItem_About.setName("jMenuItem_About"); // NOI18N
        helpMenu.add(jMenuItem_About);

        menuBar.add(helpMenu);

        statusPanel.setName("statusPanel"); // NOI18N

        statusPanelSeparator.setName("statusPanelSeparator"); // NOI18N

        statusMessageLabel.setName("statusMessageLabel"); // NOI18N

        statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        statusAnimationLabel.setName("statusAnimationLabel"); // NOI18N

        progressBar.setName("progressBar"); // NOI18N

        javax.swing.GroupLayout statusPanelLayout = new javax.swing.GroupLayout(statusPanel);
        statusPanel.setLayout(statusPanelLayout);
        statusPanelLayout.setHorizontalGroup(
            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(statusPanelSeparator, javax.swing.GroupLayout.DEFAULT_SIZE, 618, Short.MAX_VALUE)
            .addGroup(statusPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(statusMessageLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 448, Short.MAX_VALUE)
                .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(statusAnimationLabel)
                .addContainerGap())
        );
        statusPanelLayout.setVerticalGroup(
            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(statusPanelLayout.createSequentialGroup()
                .addComponent(statusPanelSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(statusMessageLabel)
                    .addComponent(statusAnimationLabel)
                    .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(3, 3, 3))
        );

        setComponent(mainPanel);
        setMenuBar(menuBar);
        setStatusBar(statusPanel);

        bindingGroup.bind();
    }// </editor-fold>//GEN-END:initComponents

    private void jMenuItem_ListItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_ListItemActionPerformed
        

    }//GEN-LAST:event_jMenuItem_ListItemActionPerformed

    

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem jMenuItem_AddCustomer;
    private javax.swing.JMenuItem jMenuItem_AddEmployy;
    private javax.swing.JMenuItem jMenuItem_AddItem;
    private javax.swing.JMenuItem jMenuItem_AddStore;
    private javax.swing.JMenuItem jMenuItem_AddTerminal;
    private javax.swing.JMenuItem jMenuItem_EditCustomer;
    private javax.swing.JMenuItem jMenuItem_EditEmployee;
    private javax.swing.JMenuItem jMenuItem_EditItem;
    private javax.swing.JMenuItem jMenuItem_EditStore;
    private javax.swing.JMenuItem jMenuItem_EditTerminal;
    private javax.swing.JMenuItem jMenuItem_GenerateReport_Customer;
    private javax.swing.JMenuItem jMenuItem_GenerateReport_Item;
    private javax.swing.JMenuItem jMenuItem_GenerateReport_Store;
    private javax.swing.JMenuItem jMenuItem_ListCustomer;
    private javax.swing.JMenuItem jMenuItem_ListEmployee;
    private javax.swing.JMenuItem jMenuItem_ListItem;
    private javax.swing.JMenuItem jMenuItem_ListStore;
    private javax.swing.JMenuItem jMenuItem_ListTerminal;
    private javax.swing.JMenuItem jMenuItem_SearchCustomer;
    private javax.swing.JMenuItem jMenuItem_SearchEmployee;
    private javax.swing.JMenuItem jMenuItem_SearchItem;
    private javax.swing.JMenuItem jMenuItem_SearchStore;
    private javax.swing.JMenuItem jMenuItem_SearchTerminal;
    private javax.swing.JMenu jMenu_Customer;
    private javax.swing.JMenu jMenu_Product;
    private javax.swing.JMenu jMenu_Report;
    private javax.swing.JMenu jMenu_Store;
    private javax.swing.JPanel jPanel_customer;
    private javax.swing.JPanel jPanel_employee;
    private javax.swing.JPanel jPanel_stockItem;
    private javax.swing.JPanel jPanel_store;
    private javax.swing.JPanel jPanel_terminal;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTabbedPane jTabbedPane_tables;
    private javax.swing.JTable jTable_stockItem;
    private javax.swing.JPanel mainPanel;
    private javax.swing.JMenuBar menuBar;
    private javax.swing.JProgressBar progressBar;
    private javax.swing.JLabel statusAnimationLabel;
    private javax.swing.JLabel statusMessageLabel;
    private javax.swing.JPanel statusPanel;
    private org.jdesktop.beansbinding.BindingGroup bindingGroup;
    // End of variables declaration//GEN-END:variables


    
}
